<?php
/* Smarty version 3.1.30, created on 2017-04-20 15:26:35
  from "D:\phpStudy\WWW\Myproject\Projects_liu\Application\User\view\fatie.html" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_58f862ab6e0a45_39293954',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '5659102bcf9367bb81ef6f2bb787f21c67f20c9d' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\Myproject\\Projects_liu\\Application\\User\\view\\fatie.html',
      1 => 1492673191,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_58f862ab6e0a45_39293954 (Smarty_Internal_Template $_smarty_tpl) {
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <?php echo '<script'; ?>
 src="./jquery-3.1.1.min.js" type="text/javascript"><?php echo '</script'; ?>
>
    </head>
    <body>
        标题：<input type="text" name="biaoti"/><span id="span1"></span><br/>
        内容：<br/><textarea id="wenzhang"></textarea><br/><span id="span2"></span><br/>
        <input type="button" name="button" value="提交"/>
        <?php echo '<script'; ?>
 type="text/javascript">
            
            $("input[name=button]").click(function(){
               var biaoti=$("input[name=biaoti]").val();
               var wen=$("#wenzhang").val();
               if(biaoti==""){
                   $("#span1").css("color","red");
                   $("#span1").html("标题不能为空");
               }else if(wenzhang==""){
                   $("#span1").html("");
                   $("#span2").css("color","red");
                   $("#span2").html("内容不能为空");
               }
               $("#span2").html("");
               $.ajax({
                  type:"post",
                  url:"index.php?m=User&c=User&a=FT",
                  data:{biaoti:biaoti,wenzhang:wen},
                  success:function(a){
                     if(a==1){
                         window.location.href ="index.php?m=User&c=User&a=liebiao"; 
                     }
                  }
                     }); 
            });
            
        <?php echo '</script'; ?>
>
    </body>
</html>
<?php }
}
